package com.hhwy.framework.persistent.entity;

import java.io.Serializable;

/**
 * <b>类 名 称：</b>DRelation 实体关系信息<br/>
 * <b>类 描 述：</b><br/>
 * <b>创 建 人：</b>lihuiming<br/>
 * <b>修 改 人：</b>Administrator<br/>
 * <b>修改时间：</b>2014年8月4日 上午8:51:42<br/>
 * <b>修改备注：</b><br/>
 * @version 1.0.0<br/>
 */
public class DRelation  implements Serializable{

	private static final long serialVersionUID = 2131546534005869089L;

	Object value;
	private String name;

	private String type ;
	private String relationType;
	private String cascade;
	private String fetch;
	private String mappedBy;
	private String targetClass;
	private String targetProperty;
	private Class<?> relationClass;

	
	public DRelation(String relationName, String type, String relationType, String cascade,
			String fetch, String mappedBy, String targetClass,
			String targetProperty, Class<?> relationClass) {
		this.type = type;
		this.name = relationName;
		this.relationType = relationType;
		this.cascade = cascade;
		this.fetch = fetch;
		this.mappedBy = mappedBy;
		this.targetClass = targetClass;
		this.targetProperty = targetProperty;
		this.relationClass = relationClass;
	}

	@Override
	public String toString() {
		return this.name + " " + this.type + " " + this.cascade + " "
				+ this.fetch + " " + this.mappedBy + " " + this.targetClass
				+ " " + this.targetProperty;
	}

	public String getRelationType() {
		return relationType;
	}

	public void setRelationType(String relationType) {
		this.relationType = relationType;
	}

	public Class<?> getRelationClass() {
		return relationClass;
	}

	public void setRelationClass(Class<?> relationClass) {
		this.relationClass = relationClass;
	}

	public String getTargetProperty() {
		return targetProperty;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setValue(Object value) {
		this.value = value;
	}

	public void setType(String type) {
		this.type = type;
	}

	public void setCascade(String cascade) {
		this.cascade = cascade;
	}

	public void setFetch(String fetch) {
		this.fetch = fetch;
	}

	public void setMappedBy(String mappedBy) {
		this.mappedBy = mappedBy;
	}

	public void setTargetClass(String targetClass) {
		this.targetClass = targetClass;
	}

	public void setTargetProperty(String targetProperty) {
		this.targetProperty = targetProperty;
	}

	public Object getTargetClass() {
		return targetClass;
	}

	public Object getName() {
		return name;
	}
}
